package org.example.curriculum_design_6_16.common.business;

import org.example.curriculum_design_6_16.common.base.BaseException;

/**
 * 业务异常（400状态码）
 */
public class BusinessException extends BaseException {
    public BusinessException(String errorCode, String message) {
        super(400, errorCode, message);
    }

    // 常用业务异常
    public static BusinessException paramsError() {
        return new BusinessException("PARAM_001", "参数校验失败");
    }

    public static BusinessException duplicateOperation() {
        return new BusinessException("OPERATION_001", "请勿重复操作");
    }
}